
const { success,error } = require('../utils/response')

class Upload {
  async uploadImg(ctx,next){
    const { file } = ctx.request.files
    if(file){
      success(ctx,file)
    } else {
      return error(ctx,null)
    }
  }
}

module.exports = new Upload